<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    

<h:panelGroup rendered="#{p_enableLockScr}">
<ui:include src="/atom/lockScr.xhtml" />
</h:panelGroup>

<rich:panel id="toolbarPanel">
<h:outputText value="#{p_sysurl}" rendered="#{p_sysurl != null}" styleClass="url"/>
<br /><br />
<center>

<h:panelGroup rendered="#{p_admin.action == 'list'}">
<a4j:include viewId="#{p_searchForm}" />
</h:panelGroup>
</center>

<br />

<center>
<s:div styleClass="toolbarBody">

<h:panelGroup id="clearControl" rendered="#{p_admin.action == 'list'}">
<a4j:commandLink styleClass="control" action="#{p_admin.clearResults}" id="clearLink" 
						reRender="detail,header" title="#{p_enableHK ? messages['py.org.atom.toolbar.hotKey.Clear'] : ''}">
<h:graphicImage value="/img/eraser.png" id="clear" styleClass="toolbarPic" />
<h:outputLabel value="#{messages['py.org.atom.toolbar.Clear']}" for="clear" />
</a4j:commandLink>
</h:panelGroup>

<h:panelGroup id="findControl" rendered="#{p_findControl and p_admin.action == 'list'}">
<a4j:commandLink styleClass="control" action="#{p_admin.find}" id="findLink" 
						reRender="detail,header" title="#{p_enableHK ? messages['py.org.atom.toolbar.hotKey.Find'] : ''}">
<h:graphicImage value="/img/find.png" id="find" styleClass="toolbarPic" />
<h:outputLabel value="#{messages['py.org.atom.toolbar.Find']}" for="find" />
</a4j:commandLink>
</h:panelGroup>

<h:panelGroup id="newControl" rendered="#{p_newControl and p_admin.action == 'list'}">
<a4j:commandLink styleClass="control" action="#{p_admin.create}" id="newLink" 
						reRender="detail,header" title="#{p_enableHK ? messages['py.org.atom.toolbar.hotKey.New'] : ''}">
<h:graphicImage value="/img/new.png" id="new" styleClass="toolbarPic" />
<h:outputLabel value="#{messages['py.org.atom.toolbar.New']}" for="new" />
</a4j:commandLink>
</h:panelGroup>

<h:panelGroup id="saveControl" rendered="#{p_saveControl and p_admin.action == 'form'}">
<a4j:commandLink styleClass="control" action="#{p_admin.save}" id="saveLink" 
						reRender="detail,header" title="#{p_enableHK ? messages['py.org.atom.toolbar.hotKey.Save'] : ''}">
<h:graphicImage value="/img/save.png" id="save" styleClass="toolbarPic" />
<h:outputLabel value="#{messages['py.org.atom.toolbar.Save']}" for="save" />
</a4j:commandLink>
</h:panelGroup>

<h:panelGroup id="deleteControl" rendered="#{p_deleteControl and p_admin.action == 'form' and p_admin.loadedInstance}">
<a4j:commandLink styleClass="control" action="#{p_admin.del(p_admin.instance)}" id="deleteLink" 
						reRender="detail,header" title="#{p_enableHK ? messages['py.org.atom.toolbar.hotKey.Delete'] : ''}"
						onclick="if(!confirm('#{messages['py.org.atom.ConfirmDelete']}')){ return false; }">
<h:graphicImage value="/img/delete.png" id="delete" styleClass="toolbarPic" />
<h:outputLabel value="#{messages['py.org.atom.toolbar.Delete']}" for="delete" />
</a4j:commandLink>
</h:panelGroup>

<h:panelGroup id="cancelControl" rendered="#{p_admin.action != 'list'}">
<a4j:commandLink styleClass="control" action="#{p_admin.cancel}" id="cancelLink" 
						reRender="detail,header" title="#{p_enableHK ? messages['py.org.atom.toolbar.hotKey.Cancel'] : ''}" immediate="true">
<h:graphicImage value="/img/cancel.png" id="cancel" styleClass="toolbarPic" />
<h:outputLabel value="#{messages['py.org.atom.toolbar.Cancel']}" for="cancel" />
</a4j:commandLink>
</h:panelGroup>

<h:panelGroup id="opts" rendered="#{p_admin.action == 'list'}" layout="span">
<a4j:include viewId="/atom/searchOptions.xhtml">
<ui:param name="p_admin" value="#{p_admin}" />
</a4j:include>
</h:panelGroup>

</s:div>
</center>


</rich:panel>

<h:panelGroup rendered="#{p_enableHK}">
    <ui:include src="/atom/hotKey.xhtml">
    	<ui:param name="p_key" value="#{messages['py.org.atom.toolbar.hotKey.Clear']}" />
    	<ui:param name="p_triggerId" value="clearLink" />
    </ui:include>
    <ui:include src="/atom/hotKey.xhtml">
    	<ui:param name="p_key" value="#{messages['py.org.atom.toolbar.hotKey.Find']}" />
    	<ui:param name="p_triggerId" value="findLink" />
    </ui:include>
    <ui:include src="/atom/hotKey.xhtml">
    	<ui:param name="p_key" value="#{messages['py.org.atom.toolbar.hotKey.New']}" />
    	<ui:param name="p_triggerId" value="newLink" />
    </ui:include>
    <ui:include src="/atom/hotKey.xhtml">
    	<ui:param name="p_key" value="#{messages['py.org.atom.toolbar.hotKey.Save']}" />
    	<ui:param name="p_triggerId" value="saveLink" />
    </ui:include>
    <ui:include src="/atom/hotKey.xhtml">
    	<ui:param name="p_key" value="#{messages['py.org.atom.toolbar.hotKey.Delete']}" />
    	<ui:param name="p_triggerId" value="deleteLink" />
    </ui:include>
    <ui:include src="/atom/hotKey.xhtml">
    	<ui:param name="p_key" value="#{messages['py.org.atom.toolbar.hotKey.Cancel']}" />
    	<ui:param name="p_triggerId" value="cancelLink" />
    </ui:include>        
</h:panelGroup>


</ui:composition>